Integrand size = 38, antiderivative size = 200 \[ \int \frac {(a+a \sin (e+f x))^3 (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=\frac {8 \sqrt {2} a^3 (A+B) \text {arctanh}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{\sqrt {c} f}-\frac {2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}}-\frac {2 a^3 (A+B) c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac {4 a^3 (A+B) c \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}-\frac {8 a^3 (A+B) \cos (e+f x)}{f \sqrt {c-c \sin (e+f x)}} \]
[Out]
Time = 0.38 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.132, Rules used = {3046, 2939, 2758, 2728, 212} \[ \int \frac {(a+a \sin (e+f x))^3 (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=\frac {8 \sqrt {2} a^3 (A+B) \text {arctanh}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{\sqrt {c} f}-\frac {2 a^3 c^2 (A+B) \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac {4 a^3 c (A+B) \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}-\frac {8 a^3 (A+B) \cos (e+f x)}{f \sqrt {c-c \sin (e+f x)}}-\frac {2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}} \]
[In]
[Out]
Rule 212
Rule 2728
Rule 2758
Rule 2939
Rule 3046
Rubi steps \begin{align*} \text {integral}& = \left (a^3 c^3\right ) \int \frac {\cos ^6(e+f x) (A+B \sin (e+f x))}{(c-c \sin (e+f x))^{7/2}} \, dx \\ & = -\frac {2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}}+\left (a^3 (A+B) c^3\right ) \int \frac {\cos ^6(e+f x)}{(c-c \sin (e+f x))^{7/2}} \, dx \\ & = -\frac {2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}}-\frac {2 a^3 (A+B) c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}+\left (2 a^3 (A+B) c^2\right ) \int \frac {\cos ^4(e+f x)}{(c-c \sin (e+f x))^{5/2}} \, dx \\ & = -\frac {2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}}-\frac {2 a^3 (A+B) c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac {4 a^3 (A+B) c \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}+\left (4 a^3 (A+B) c\right ) \int \frac {\cos ^2(e+f x)}{(c-c \sin (e+f x))^{3/2}} \, dx \\ & = -\frac {2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}}-\frac {2 a^3 (A+B) c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac {4 a^3 (A+B) c \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}-\frac {8 a^3 (A+B) \cos (e+f x)}{f \sqrt {c-c \sin (e+f x)}}+\left (8 a^3 (A+B)\right ) \int \frac {1}{\sqrt {c-c \sin (e+f x)}} \, dx \\ & = -\frac {2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}}-\frac {2 a^3 (A+B) c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac {4 a^3 (A+B) c \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}-\frac {8 a^3 (A+B) \cos (e+f x)}{f \sqrt {c-c \sin (e+f x)}}-\frac {\left (16 a^3 (A+B)\right ) \text {Subst}\left (\int \frac {1}{2 c-x^2} \, dx,x,-\frac {c \cos (e+f x)}{\sqrt {c-c \sin (e+f x)}}\right )}{f} \\ & = \frac {8 \sqrt {2} a^3 (A+B) \text {arctanh}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{\sqrt {c} f}-\frac {2 a^3 B c^3 \cos ^7(e+f x)}{7 f (c-c \sin (e+f x))^{7/2}}-\frac {2 a^3 (A+B) c^2 \cos ^5(e+f x)}{5 f (c-c \sin (e+f x))^{5/2}}-\frac {4 a^3 (A+B) c \cos ^3(e+f x)}{3 f (c-c \sin (e+f x))^{3/2}}-\frac {8 a^3 (A+B) \cos (e+f x)}{f \sqrt {c-c \sin (e+f x)}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 11.55 (sec) , antiderivative size = 193, normalized size of antiderivative = 0.96 \[ \int \frac {(a+a \sin (e+f x))^3 (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=-\frac {a^3 \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) (1+\sin (e+f x))^3 \left ((6720+6720 i) \sqrt [4]{-1} (A+B) \arctan \left (\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt [4]{-1} \left (1+\tan \left (\frac {1}{4} (e+f x)\right )\right )\right )-2 \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) (-2086 A-2236 B+6 (7 A+22 B) \cos (2 (e+f x))-(448 A+673 B) \sin (e+f x)+15 B \sin (3 (e+f x)))\right )}{420 f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^6 \sqrt {c-c \sin (e+f x)}} \]
[In]
[Out]
Time = 2.97 (sec) , antiderivative size = 233, normalized size of antiderivative = 1.16
method | result | size |
default | \(\frac {2 \left (\sin \left (f x +e \right )-1\right ) \sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, a^{3} \left (-420 c^{\frac {7}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}}{2 \sqrt {c}}\right ) A -420 c^{\frac {7}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}}{2 \sqrt {c}}\right ) B +15 B \left (c \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {7}{2}}+21 A \left (c \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {5}{2}} c +21 B \left (c \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {5}{2}} c +70 A \left (c \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {3}{2}} c^{2}+70 B \left (c \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {3}{2}} c^{2}+420 \sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, A \,c^{3}+420 \sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, B \,c^{3}\right )}{105 c^{4} \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}\) | \(233\) |
parts | \(-\frac {A \,a^{3} \left (\sin \left (f x +e \right )-1\right ) \sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}}{2 \sqrt {c}}\right )}{\sqrt {c}\, \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}-\frac {B \,a^{3} \left (\sin \left (f x +e \right )-1\right ) \sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \left (105 c^{\frac {7}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}}{2 \sqrt {c}}\right )-30 \left (c \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {7}{2}}+84 \left (c \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {5}{2}} c -140 \left (c \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {3}{2}} c^{2}\right )}{105 c^{4} \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}-\frac {a^{3} \left (A +3 B \right ) \left (\sin \left (f x +e \right )-1\right ) \sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \left (15 c^{\frac {5}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}}{2 \sqrt {c}}\right )-6 \left (c \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {5}{2}}+10 \left (c \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {3}{2}} c -30 \sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, c^{2}\right )}{15 c^{3} \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}+\frac {a^{3} \left (3 A +B \right ) \left (\sin \left (f x +e \right )-1\right ) \sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \left (-\sqrt {c}\, \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}}{2 \sqrt {c}}\right )+2 \sqrt {c \left (1+\sin \left (f x +e \right )\right )}\right )}{c \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}-\frac {a^{3} \left (A +B \right ) \left (\sin \left (f x +e \right )-1\right ) \sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \left (3 c^{\frac {3}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}}{2 \sqrt {c}}\right )-2 \left (c \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {3}{2}}\right )}{c^{2} \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}\) | \(540\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 353, normalized size of antiderivative = 1.76 \[ \int \frac {(a+a \sin (e+f x))^3 (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=\frac {2 \, {\left (\frac {210 \, \sqrt {2} {\left ({\left (A + B\right )} a^{3} c \cos \left (f x + e\right ) - {\left (A + B\right )} a^{3} c \sin \left (f x + e\right ) + {\left (A + B\right )} a^{3} c\right )} \log \left (-\frac {\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) - 2\right )} \sin \left (f x + e\right ) + \frac {2 \, \sqrt {2} \sqrt {-c \sin \left (f x + e\right ) + c} {\left (\cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right )}}{\sqrt {c}} + 3 \, \cos \left (f x + e\right ) + 2}{\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right )}{\sqrt {c}} - {\left (15 \, B a^{3} \cos \left (f x + e\right )^{4} - 3 \, {\left (7 \, A + 22 \, B\right )} a^{3} \cos \left (f x + e\right )^{3} - {\left (133 \, A + 253 \, B\right )} a^{3} \cos \left (f x + e\right )^{2} + 4 \, {\left (133 \, A + 148 \, B\right )} a^{3} \cos \left (f x + e\right ) + 4 \, {\left (161 \, A + 191 \, B\right )} a^{3} - {\left (15 \, B a^{3} \cos \left (f x + e\right )^{3} + 3 \, {\left (7 \, A + 27 \, B\right )} a^{3} \cos \left (f x + e\right )^{2} - 4 \, {\left (28 \, A + 43 \, B\right )} a^{3} \cos \left (f x + e\right ) - 4 \, {\left (161 \, A + 191 \, B\right )} a^{3}\right )} \sin \left (f x + e\right )\right )} \sqrt {-c \sin \left (f x + e\right ) + c}\right )}}{105 \, {\left (c f \cos \left (f x + e\right ) - c f \sin \left (f x + e\right ) + c f\right )}} \]
[In]
[Out]
\[ \int \frac {(a+a \sin (e+f x))^3 (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=a^{3} \left (\int \frac {A}{\sqrt {- c \sin {\left (e + f x \right )} + c}}\, dx + \int \frac {3 A \sin {\left (e + f x \right )}}{\sqrt {- c \sin {\left (e + f x \right )} + c}}\, dx + \int \frac {3 A \sin ^{2}{\left (e + f x \right )}}{\sqrt {- c \sin {\left (e + f x \right )} + c}}\, dx + \int \frac {A \sin ^{3}{\left (e + f x \right )}}{\sqrt {- c \sin {\left (e + f x \right )} + c}}\, dx + \int \frac {B \sin {\left (e + f x \right )}}{\sqrt {- c \sin {\left (e + f x \right )} + c}}\, dx + \int \frac {3 B \sin ^{2}{\left (e + f x \right )}}{\sqrt {- c \sin {\left (e + f x \right )} + c}}\, dx + \int \frac {3 B \sin ^{3}{\left (e + f x \right )}}{\sqrt {- c \sin {\left (e + f x \right )} + c}}\, dx + \int \frac {B \sin ^{4}{\left (e + f x \right )}}{\sqrt {- c \sin {\left (e + f x \right )} + c}}\, dx\right ) \]
[In]
[Out]
\[ \int \frac {(a+a \sin (e+f x))^3 (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=\int { \frac {{\left (B \sin \left (f x + e\right ) + A\right )} {\left (a \sin \left (f x + e\right ) + a\right )}^{3}}{\sqrt {-c \sin \left (f x + e\right ) + c}} \,d x } \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 647 vs. \(2 (177) = 354\).
Time = 0.39 (sec) , antiderivative size = 647, normalized size of antiderivative = 3.24 \[ \int \frac {(a+a \sin (e+f x))^3 (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=\text {Too large to display} \]
[In]
[Out]
Timed out. \[ \int \frac {(a+a \sin (e+f x))^3 (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx=\int \frac {\left (A+B\,\sin \left (e+f\,x\right )\right )\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^3}{\sqrt {c-c\,\sin \left (e+f\,x\right )}} \,d x \]
[In]
[Out]